<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"></base>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/barContent.js" charset="gbk"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script src="ckeditor/_samples/sample.js" type="text/javascript"></script>
<script language="javascript">
	function insert()
	{
		var pic=document.getElementById("load");
		pic.innerHTML="<input type='file' name='portrait' id='portrait' size='30' /><div id=load></div>";
	}
</script>
<link type="text/css" rel="stylesheet" href="css/barContent.css" />
<title>二手淘吧具体</title>
</head>

<body>

	<div id="container">
		<div id="navi_container">
		
			<!--这里是navigation的顶部栏-->
			<div id="navi_top">
				<div class="navi_left">南昌站</div>
				<div class="navi_left">网页版</div>
				
				<div class="navi_right">推广使用</div>
				
				
				
	        <c:choose>
               <c:when test="${sessionScope.nickName==null}">
               <div class="navi_right"><a href="#">注册</a></div>
               <div class="navi_right"><a href="user/login_queryLoginPage.action">登录</a></div>
               </c:when>                 
          	  <c:otherwise>
          	  
          	  <div class="navi_right"><a  href="user/PersonSpace_queryMsgStore.action">我的收藏</a></div>
          	  <div class="navi_right"><a href="user/login_doLogout.action">注销</a></div>
          	  <div class="navi_right"><a target="right" href="user/PersonSpace_queryLabelMsg.action">欢迎${sessionScope.nickName}</a></div>
          	 </c:otherwise>
        	</c:choose>
        	
        	
			</div>
			<!--这里是navigation的顶部栏-->
			
			<!--这里是navigation的infor栏-->
			<div id="navigation_infor">
				<div id="logo"><a href="index.jsp"><img src="img/logo.png" width="220" height="77" border="0"/></a></div>
				<div id="search_content">
						<form action="#" method="post" name="search" id="search" >
							<input type="text" size="37" name="search" />
							<input type="submit" value="搜索" id="commomSearch" />
							<input type="submit" value="高级搜索" id="advanceSearch" />
						</form>
				</div>
			</div>
			<!--这里是navigation的infor栏-->


			<!--这里是navigation导航栏-->
			<div id="navigation">
				<div class="navigator_space_left"></div>
				<a href="index.action"><div id="nvg0" class="navigator">首页</div></a>
				<c:forEach  var="catagory"  items="${list}"   varStatus="s">
				   <a href="user/publish_queryCataSecondList.action?catagoryId=${catagory.catagoryID}"><div id="nvg${s.index+1}" class="navigator">${catagory.catagoryName}</div></a>
				</c:forEach>
			</div>
			<!--这里是navigation导航栏-->

			
		</div>
		 
		
		 
		 
		<div class="category_location">
			<span>首页&gt;&gt;</span><span>二手淘吧</span>
		</div>
		
		<div id="content_container">
		
			<!--这里开始是中间内容左侧-->
			<div id="content_left">
			
				<div id="tie_title" style="line-height:40px;">
					<span>${topic.title}</span>
				</div>
				
				
				<!--这里是楼主发帖单条记录-->
				<div id="tie_content">
				
					<!--这里是头像-->
					<div id="icon_head">
						<div id="portrait">
							<img src="${topic.image }" width="100" height="100" />
						</div>
						<div id="nickName">${topic.nickName }</div>
						<!-- <div id="nickName">这里待定</div> -->
					</div>
					<!--这里是头像-->
					
					<!--这里是内容-->
					<div id="post_content_main">
						${topic.content}
					</div>
					<!--这里是内容-->

				</div>
				<div style="border:1px solid #6eb205; clear:left;"></div>
				<!--这里是楼主发帖单条记录-->
				
				
				
				   <c:forEach  var="reply"  items="${topic.list }">
						   <!--这里是回复的单条记录-->
						   <div id="tie_content">
					       <!--这里是头像-->
							<div id="icon_head">
								<div id="portrait">
									<img src="${reply.image}" width="100" height="100" />
								</div>
								<div id="nickName">${reply.nickName}</div>
								<!-- <div id="nickName">这里待定</div> -->
							</div>
							<!--这里是头像-->
							
							<!--这里是内容-->
						   <div id="post_content_main">
						   <c:if test="${fn:length(reply.forReplyId)<1} "></c:if>
							${reply.replyContent}
							
						<!--这里开始是别人回复的内容存放地方-->	
						<br />
						
						<c:forEach  var="r"  items="${topic.list }">
						  <c:if test="${r.forReplyId==reply.replyID}">
						    <div id="inner_reply_content">
							  ${r.replyContent}
							<div style="width:140px; height:auto; margin-right:10px;">${r.nickName}&nbsp;&nbsp;&nbsp;&nbsp;${r.replyTime}</div>
							</div>
						 </c:if>
						</c:forEach>
						
						
						
						
						
						<!--这里开始是别人回复的内容存放地方-->	
						
						</div>
						<!--这里是内容-->
						
						<c:if test="${sessionScope.nickName!=null}">
						  <div id="reply" class="reply">回复</div>
						</c:if>
						
						<div id="replyByOthers" class="replyByOthers">
						
						     <c:set  scope="page"   value="${reply.topicID}"  var="var1"></c:set> 
						
						<form  method="post"  action="user/doreply.action?topic.topicID=${var1}">
							<div>
							      <input  type="hidden" name="reply.topicID" value="${reply.topicID}"/>
							      <input  type="hidden" name="reply.forReplyId" value="${reply.replyID}"/>
								<input type="text"  name="reply.replyContent" style="width:480px; margin-left:20px;" />
							</div>
							<div style="width:60px; height:auto; margin-right:10px;">
								<input type="submit" value="评论"/>
							</div>
						</form>
					</div>
					</div>
					<div style="border:1px solid #6eb205; clear:left;"></div>
					<!--这里回复是单条记录-->
				</c:forEach>
				
		
			</div>	
			<!--这里开始是中间内容左侧-->
			
			
			<!--这里开始是中间内容右侧-->
			<div id="content_right">
			
				<div id="bar_public_notice">
					<div id="bar_public_head">你可能感兴趣的</div>
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;list-style:none;background-color:#FFF">
						
						<c:forEach  var="topic"  items="${topics}">
						   <li><a  href="user/topic_queryTopic.action?topic.topicID=${topic.topicID }">${topic.title}</a></li>
						</c:forEach>
						
						</ul>
					</div>
				</div>
				
				
				<div id="bar_public_notice" style="margin-top:5px; border-top:none;background-color:#FFF">
					<div id="bar_public_head">亲,有新东西哦</div>
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;list-style:none">
						
						
						<c:forEach  var="msg"  items="${msgs}">
						   <li><a  href="user/publish_queryPubMsg.action?pubMsg.publishID=${msg.publishID}">${msg.title}</a></li>
						</c:forEach>
						
							
							<!-- <li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li> -->
						</ul>
					</div>
				</div>
				
			</div>	
			<!--这里开始是中间内容右侧-->
			
		</div>

		<div style="clear:left;"></div>
		
		<div style="height:300px; width:1002px;">
			<!--这里开始使用ck编辑器-->
			<textarea class="ckeditor" cols="80" id="editor1" name="describes" rows="10">
				亲，点击这里可以进行回复哦！
			</textarea>
			<!--这里开始使用ck编辑器-->
			<br />
			<div style="margin-left:400px;">
					<input type="submit" value="确定"/>
					<input type="reset" value="取消"/>
			</div>
		</div>
		
		<div id="navigation_bottom">
			<div class="navigator_bottom_space_left"></div>
			<a href="#"><div id="nvg1" class="navigator_bottom">&copy;&nbsp;&nbsp;2013-2014&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg2" class="navigator_bottom"  style="width:120px">江西师大&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg3" class="navigator_bottom" style="padding-left:0px;">简介&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg4"class="navigator_bottom">联系方法&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg5" class="navigator_bottom">招聘信息&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg6" class="navigator_bottom">关于我们&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg7" class="navigator_bottom">建议反馈</div></a>
		</div>

	</div>
	
</body>
</html>
